package com.wangshouyu.mp.pay.scene;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.gson.annotations.SerializedName;

import java.util.Objects;

/**
 * @author 王守钰
 * @description H5安卓场景信息
 * @date 2020/8/13 9:18
 */
public class H5IosSceneInfo extends H5SceneInfo {

    /**
     * 应用名
     */
    @SerializedName(value = "app_name")
    @JsonProperty(value = "app_name")
    @JSONField(name = "app_name")
    private String appName;

    /**
     * bundle_id
     */
    @SerializedName(value = "bundle_id")
    @JsonProperty(value = "bundle_id")
    @JSONField(name = "bundle_id")
    private String bundleId;

    public String getAppName() {
        return appName;
    }

    public void setAppName(String appName) {
        this.appName = appName;
    }

    public String getBundleId() {
        return bundleId;
    }

    public void setBundleId(String bundleId) {
        this.bundleId = bundleId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        H5IosSceneInfo that = (H5IosSceneInfo) o;
        return Objects.equals(appName, that.appName) &&
                Objects.equals(bundleId, that.bundleId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(appName, bundleId);
    }

    @Override
    public String toString() {
        return "H5IosSceneInfo{" +
                "appName='" + appName + '\'' +
                ", bundleId='" + bundleId + '\'' +
                '}';
    }
}
